package com.neu.niuyuchao.util;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class ConvertUtil {
    public static Map<String,String> convert(Map<String,String[]> params){
        Map<String,String> map=new HashMap<>();
        for(Map.Entry<String,String[]> entry:params.entrySet()){
            String key=entry.getKey();
            String[] values=entry.getValue();
            String value="";
            if(values!=null){
                value=Arrays.toString(values).replace("[","")
                        .replace("]","")
                        .replace(", ",",");

            }
            map.put(key,value);
        }

        return map;
    }
}
